<?php

namespace App\Providers;

use Illuminate\Support\ServiceProvider;
use DB;

class AppServiceProvider extends ServiceProvider
{
    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot()
    {
        //共享links数据
        $data = DB::table('storelinks')->where('linksSwitch','0')->get();

        //网站配置
        $con = DB::table('storeconfig')->where('configStatus','0')->first();
        view()->share('links',$data);
        view()->share('con',$con);
    }

    /**
     * Register any application services.
     *
     * @return void
     */
    public function register()
    {
        //
    }
}
